package com.hpf.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: 负载均衡算法
 * @datetime: 2020/9/26 16:07
 * @author: huangpengfei
 */
@Configuration
public class MyRule {

    /**
     * 随机
     * @return
     */
    @Bean
    public IRule rule(){
        return new RandomRule();
    }
}
